//
//  A_3ViewController.m
//  RACExamale
//
//  Created by cym_bj on 2017/11/29.
//  Copyright © 2017年 com.cym. All rights reserved.
//

#import "A_3ViewController.h"
#import <ReactiveObjC/ReactiveObjC.h>

@interface A_3ViewController ()

@end

@implementation A_3ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    //RACSubject
    self.navigationItem.title=@"RACSubject";
    
    
    // 1、 创建信号
    
    RACSubject *subject=[RACSubject subject];
    
    //2、 订阅信号
    [subject subscribeNext:^(id  _Nullable x) {
       
        NSLog(@"%@",x);
    }];
    
    //3、 发送数据
    
    [subject sendNext:@"发送数据"];
    
    
    
    
    
    
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
